package com.fr.similar.bean;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

/**
 * @author Smile.Wu
 * @date 2015年12月28日 下午3:22:18
 */
public class TalentInfo {

    private long talentId;

    private long hunterId;

    private long cityId;

    private double anualSalary;

    private List<String> positionTitles = new ArrayList<String>(0);

    private int workYear;

    private String email;
    private String phone;

    private int degreeId = 0;

    private String expectIndustry1;
    private String expectCity;
    private String expectPositionTitles;
    private String jobTitle;
    private int expectAnnualSalary;
    private int anualSalary1;
    private Date lastModifyTime;

    // 解析之后的期望的属性
    private List<Long> expectIndustry = new ArrayList<>(0);
    private List<Long> expectCityIds = new ArrayList<>(0);
    private List<Long> recommendedEnterpriseIds = new ArrayList<>(0);
    private double expectMinAnnualSalary;
    private double expectMaxAnnualSalary;
    // 期望职位对应的公司信息
    private List<Long> companyDevelopStatus;
    private List<Long> companyScale;
    private List<Long> companyStyle;

    private double matchDegree;

    private String resume;

    private long resumeId;

    private List<String> dnaTags = new ArrayList<>(0);

    public List<String> getDnaTags() {
        return dnaTags;
    }

    public void setDnaTags(List<String> dnaTags) {
        this.dnaTags = dnaTags;
    }

    public long getResumeId() {
        return resumeId;
    }

    public void setResumeId(long resumeId) {
        this.resumeId = resumeId;
    }

    public String getResume() {
        return resume;
    }

    public void setResume(String resume) {
        this.resume = resume;
    }

    public List<Long> getCompanyDevelopStatus() {
        return companyDevelopStatus;
    }

    public void setCompanyDevelopStatus(List<Long> companyDevelopStatus) {
        this.companyDevelopStatus = companyDevelopStatus;
    }

    public List<Long> getCompanyScale() {
        return companyScale;
    }

    public void setCompanyScale(List<Long> companyScale) {
        this.companyScale = companyScale;
    }

    public List<Long> getCompanyStyle() {
        return companyStyle;
    }

    public void setCompanyStyle(List<Long> companyStyle) {
        this.companyStyle = companyStyle;
    }

    public String getExpectIndustry1() {
        return expectIndustry1;
    }

    public void setExpectIndustry1(String expectIndustry1) {
        this.expectIndustry1 = expectIndustry1;
    }

    public String getExpectCity() {
        return expectCity;
    }

    public void setExpectCity(String expectCity) {
        this.expectCity = expectCity;
    }

    public String getExpectPositionTitles() {
        return expectPositionTitles;
    }

    public void setExpectPositionTitles(String expectPositionTitles) {
        this.expectPositionTitles = expectPositionTitles;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public int getExpectAnnualSalary() {
        return expectAnnualSalary;
    }

    public void setExpectAnnualSalary(int expectAnnualSalary) {
        this.expectAnnualSalary = expectAnnualSalary;
    }

    public int getAnualSalary1() {
        return anualSalary1;
    }

    public void setAnualSalary1(int anualSalary1) {
        this.anualSalary1 = anualSalary1;
    }

    public TalentInfo(long talentId) {
        super();
        this.talentId = talentId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public double getMatchDegree() {
        return matchDegree;
    }

    public void setMatchDegree(double matchDegree) {
        this.matchDegree = matchDegree;
    }

    public TalentInfo() {

    }

    public int getDegreeId() {
        return degreeId;
    }

    public void setDegreeId(int degreeId) {
        this.degreeId = degreeId;
    }

    public long getTalentId() {
        return talentId;
    }

    public void setTalentId(long talentId) {
        this.talentId = talentId;
    }

    public long getHunterId() {
        return hunterId;
    }

    public void setHunterId(long hunterId) {
        this.hunterId = hunterId;
    }

    public List<Long> getExpectIndustry() {
        return expectIndustry;
    }

    public void setExpectIndustry(List<Long> expectIndustry) {
        this.expectIndustry = expectIndustry;
    }

    public void addExpectIndustryId(long id) {
        if (id > 0 && !expectIndustry.contains(id)) {
            expectIndustry.add(id);
        }
    }

    public List<Long> getExpectCityIds() {
        return expectCityIds;
    }

    public void setExpectCityIds(List<Long> expectCityIds) {
        this.expectCityIds = expectCityIds;
    }

    public void addCityId(long cid) {
        if (cid > 0 && !this.expectCityIds.contains(cid)) {
            expectCityIds.add(cid);
        }
    }

    public long getCityId() {
        return cityId;
    }

    public void setCityId(long cityId) {
        this.cityId = cityId;
    }

    public double getAnualSalary() {
        return anualSalary;
    }

    public void setAnualSalary(double anualSalary) {
        this.anualSalary = anualSalary;
    }

    public double getExpectMinAnnualSalary() {
        return expectMinAnnualSalary;
    }

    public void setExpectMinAnnualSalary(double expectMinAnnualSalary) {
        this.expectMinAnnualSalary = expectMinAnnualSalary;
    }

    public double getExpectMaxAnnualSalary() {
        return expectMaxAnnualSalary;
    }

    public void setExpectMaxAnnualSalary(double expectMaxAnnualSalary) {
        this.expectMaxAnnualSalary = expectMaxAnnualSalary;
    }

    public int getWorkYear() {
        if (workYear > 40) {
            return 0;
        }
        return workYear;
    }

    public void setWorkYear(int workYear) {
        this.workYear = workYear;
    }

    public List<Long> getRecommendedEnterpriseIds() {
        return recommendedEnterpriseIds;
    }

    public void setRecommendedEnterpriseIds(List<Long> recommendedEnterpriseIds) {
        this.recommendedEnterpriseIds = recommendedEnterpriseIds;
    }

    public List<String> getPositionTitles() {
        return positionTitles;
    }

    public void setPositionTitles(List<String> positionTitles) {
        this.positionTitles = positionTitles;
    }

    public String getPositionTitlesAsString() {
        StringBuilder b = new StringBuilder("");
        if (positionTitles != null) {
            for (String t : positionTitles) {
                b.append(t).append(",");
            }
        }
        return b.toString();
    }

    public void addPositionTitle(String title) {
        if (StringUtils.isNotBlank(title)) {
            positionTitles.add(title);
        }
    }

    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

}
